home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / FSM.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-11  |  34.6 KB  |  941 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        FSM.h
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. */
  16.  
  17. #ifndef __FSM__
  18. #define __FSM__
  19.  
  20.  
  21. #ifndef __FILES__
  22. #include <Files.h>
  23. #endif
  24. /*    #include <Types.h>                                            */
  25. /*        #include <ConditionalMacros.h>                            */
  26. /*    #include <MixedMode.h>                                        */
  27. /*    #include <OSUtils.h>                                        */
  28. /*        #include <Memory.h>                                        */
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. #if GENERATINGPOWERPC
  35. #pragma options align=mac68k
  36. #endif
  37.  
  38. #ifdef __CFM68K__
  39. #pragma lib_export on
  40. #endif
  41.  
  42.  
  43. enum {
  44. /*    The new volume mount flags */
  45.     volMountInteractBit            = 15,                            /* Input to VolumeMount: If set, it's OK for the file system */
  46.     volMountInteractMask        = 0x8000,                        /* to perform user interaction to mount the volume */
  47.     volMountChangedBit            = 14,                            /* Output from VoumeMount: If set, the volume was mounted, but */
  48.     volMountChangedMask            = 0x4000,                        /* the volume mounting information record needs to be updated. */
  49.     volMountFSReservedMask        = 0x00ff,                        /* bits 0-7 are defined by each file system for its own use */
  50.     volMountSysReservedMask        = 0xff00                        /* bits 8-15 are reserved for Apple system use */
  51. };
  52.  
  53. /*
  54.  * The new volume mount info record
  55.  */
  56. struct VolumeMountInfoHeader {
  57.     short                            length;                        /* length of location data (including self) */
  58.     VolumeType                        media;                        /* type of media (must be registered with Apple) */
  59.     short                            flags;                        /* volume mount flags. Variable length data follows */
  60. };
  61. typedef struct VolumeMountInfoHeader VolumeMountInfoHeader;
  62.  
  63. typedef VolumeMountInfoHeader *VolumeMountInfoHeaderPtr;
  64.  
  65.  
  66. enum {
  67.     gestaltFSMVersion            = 'fsm '
  68. };
  69.  
  70. typedef VCB *VCBPtr;
  71.  
  72. /*
  73.  * Miscellaneous file system values not in Files.h
  74.  */
  75.  
  76. enum {
  77.     fsUsrCNID                    = 16,                            /* First assignable directory or file number */
  78. /*    File system trap word attribute bits */
  79.     kHFSBit                        = 9,                            /* HFS call: bit 9 */
  80.     kHFSMask                    = 0x0200,
  81.     kAsyncBit                    = 10,                            /* Asynchronous call: bit 10 */
  82.     kAsyncMask                    = 0x0400
  83. };
  84.  
  85. /*
  86.  * HFSCIProc selectCode values
  87.  * Note: The trap attribute bits (the HFS bit and the asynchronous bit)
  88.  * may be set in these selectCode values.
  89.  */
  90. enum {
  91.     kFSMOpen                    = 0xA000,
  92.     kFSMClose                    = 0xA001,
  93.     kFSMRead                    = 0xA002,
  94.     kFSMWrite                    = 0xA003,
  95.     kFSMGetVolInfo                = 0xA007,
  96.     kFSMCreate                    = 0xA008,
  97.     kFSMDelete                    = 0xA009,
  98.     kFSMOpenRF                    = 0xA00A,
  99.     kFSMRename                    = 0xA00B,
  100.     kFSMGetFileInfo                = 0xA00C,
  101.     kFSMSetFileInfo                = 0xA00D,
  102.     kFSMUnmountVol                = 0xA00E,
  103.     kFSMMountVol                = 0xA00F,
  104.     kFSMAllocate                = 0xA010,
  105.     kFSMGetEOF                    = 0xA011,
  106.     kFSMSetEOF                    = 0xA012,
  107.     kFSMFlushVol                = 0xA013,
  108.     kFSMGetVol                    = 0xA014,
  109.     kFSMSetVol                    = 0xA015,
  110.     kFSMEject                    = 0xA017,
  111.     kFSMGetFPos                    = 0xA018,
  112.     kFSMOffline                    = 0xA035,
  113.     kFSMSetFilLock                = 0xA041,
  114.     kFSMRstFilLock                = 0xA042,
  115.     kFSMSetFilType                = 0xA043,
  116.     kFSMSetFPos                    = 0xA044,
  117.     kFSMFlushFile                = 0xA045,
  118. /*    The File System HFSDispatch selectCodes */
  119.     kFSMOpenWD                    = 0x0001,
  120.     kFSMCloseWD                    = 0x0002,
  121.     kFSMCatMove                    = 0x0005,
  122.     kFSMDirCreate                = 0x0006,
  123.     kFSMGetWDInfo                = 0x0007,
  124.     kFSMGetFCBInfo                = 0x0008,
  125.     kFSMGetCatInfo                = 0x0009,
  126.     kFSMSetCatInfo                = 0x000A,
  127.     kFSMSetVolInfo                = 0x000B,
  128.     kFSMLockRng                    = 0x0010,
  129.     kFSMUnlockRng                = 0x0011,
  130.     kFSMCreateFileIDRef            = 0x0014,
  131.     kFSMDeleteFileIDRef            = 0x0015,
  132.     kFSMResolveFileIDRef        = 0x0016,
  133.     kFSMExchangeFiles            = 0x0017,
  134.     kFSMCatSearch                = 0x0018,
  135.     kFSMOpenDF                    = 0x001A,
  136.     kFSMMakeFSSpec                = 0x001B,
  137. /*    The Desktop Manager HFSDispatch selectCodes */
  138.     kFSMDTGetPath                = 0x0020,
  139.     kFSMDTCloseDown                = 0x0021,
  140.     kFSMDTAddIcon                = 0x0022,
  141.     kFSMDTGetIcon                = 0x0023,
  142.     kFSMDTGetIconInfo            = 0x0024,
  143.     kFSMDTAddAPPL                = 0x0025,
  144.     kFSMDTRemoveAPPL            = 0x0026,
  145.     kFSMDTGetAPPL                = 0x0027,
  146.     kFSMDTSetComment            = 0x0028,
  147.     kFSMDTRemoveComment            = 0x0029,
  148.     kFSMDTGetComment            = 0x002A,
  149.     kFSMDTFlush                    = 0x002B,
  150.     kFSMDTReset                    = 0x002C,
  151.     kFSMDTGetInfo                = 0x002D,
  152.     kFSMDTOpenInform            = 0x002E,
  153.     kFSMDTDelete                = 0x002F,
  154. /*    The AppleShare HFSDispatch selectCodes */
  155.     kFSMGetVolParms                = 0x0030,
  156.     kFSMGetLogInInfo            = 0x0031,
  157.     kFSMGetDirAccess            = 0x0032,
  158.     kFSMSetDirAccess            = 0x0033,
  159.     kFSMMapID                    = 0x0034,
  160.     kFSMMapName                    = 0x0035,
  161.     kFSMCopyFile                = 0x0036,
  162.     kFSMMoveRename                = 0x0037,
  163.     kFSMOpenDeny                = 0x0038,
  164.     kFSMOpenRFDeny                = 0x0039,
  165.     kFSMGetXCatInfo                = 0x003A,
  166.     kFSMGetVolMountInfoSize        = 0x003F,
  167.     kFSMGetVolMountInfo            = 0x0040,
  168.     kFSMVolumeMount                = 0x0041,
  169.     kFSMShare                    = 0x0042,
  170.     kFSMUnShare                    = 0x0043,
  171.     kFSMGetUGEntry                = 0x0044,
  172.     kFSMGetForeignPrivs            = 0x0060,
  173.     kFSMSetForeignPrivs            = 0x0061
  174. };
  175.  
  176. /*
  177.  * UTDetermineVol status values
  178.  */
  179. enum {
  180.     dtmvError                    = 0,                            /* param error */
  181.     dtmvFullPathame                = 1,                            /* determined by full pathname */
  182.     dtmvVRefNum                    = 2,                            /* determined by volume refNum */
  183.     dtmvWDRefNum                = 3,                            /* determined by working directory refNum */
  184.     dtmvDriveNum                = 4,                            /* determined by drive number */
  185.     dtmvDefault                    = 5                                /* determined by default volume */
  186. };
  187.  
  188. /*
  189.  * UTGetBlock options
  190.  */
  191. enum {
  192.     gbDefault                    = 0,                            /* default value - read if not found */
  193. /*    bits and masks */
  194.     gbReadBit                    = 0,                            /* read block from disk (forced read) */
  195.     gbReadMask                    = 0x0001,
  196.     gbExistBit                    = 1,                            /* get existing cache block */
  197.     gbExistMask                    = 0x0002,
  198.     gbNoReadBit                    = 2,                            /* don't read block from disk if not found in cache */
  199.     gbNoReadMask                = 0x0004,
  200.     gbReleaseBit                = 3,                            /* release block immediately after GetBlock */
  201.     gbReleaseMask                = 0x0008
  202. };
  203.  
  204. /*
  205.  * UTReleaseBlock options
  206.  */
  207. enum {
  208.     rbDefault                    = 0,                            /* default value - just mark the buffer not in-use */
  209. /*    bits and masks */
  210.     rbWriteBit                    = 0,                            /* force write buffer to disk */
  211.     rbWriteMask                    = 0x0001,
  212.     rbTrashBit                    = 1,                            /* trash buffer contents after release */
  213.     rbTrashMask                    = 0x0002,
  214.     rbDirtyBit                    = 2,                            /* mark buffer dirty */
  215.     rbDirtyMask                    = 0x0004,
  216.     rbFreeBit                    = 3,                            /* free the buffer (save in the hash) */
  217. /*
  218.  *    rbFreeMask (rbFreeBit + rbTrashBit) works as rbTrash on < System 7.0 RamCache;
  219.  *    on >= System 7.0, rbfreeMask overrides rbTrash
  220.  */
  221.     rbFreeMask                    = 0x000A
  222. };
  223.  
  224. /*
  225.  * UTFlushCache options
  226.  */
  227. enum {
  228.     fcDefault                    = 0,                            /* default value - just flush any dirty buffers */
  229. /*    bits and masks */
  230.     fcTrashBit                    = 1,                            /* trash buffers after flushing */
  231.     fcTrashMask                    = 0x0002,
  232.     fcFreeBit                    = 3,                            /* free buffers after flushing */
  233.     fcFreeMask                    = 0x0008                        /* fcFreeMask works as fcTrash on < System 7.0 RamCache */
  234. };
  235.  
  236. /*
  237.  * UTCacheReadIP and UTCacheWriteIP cacheOption
  238.  */
  239. enum {
  240.     noCacheBit                    = 5,                            /* don't cache this please */
  241.     noCacheMask                    = 0x0020,
  242.     rdVerifyBit                    = 6,                            /* read verify */
  243.     rdVerifyMask                = 0x0040
  244. };
  245.  
  246. /*
  247.  * Cache routine internal error codes
  248.  */
  249. enum {
  250.     chNoBuf                        = 1,                            /* no free cache buffers (all in use) */
  251.     chInUse                        = 2,                            /* requested block in use */
  252.     chnotfound                    = 3,                            /* requested block not found */
  253.     chNotInUse                    = 4                                /* block being released was not in use */
  254. };
  255.  
  256. /*
  257.  * FCBRec.fcbFlags bits
  258.  */
  259. enum {
  260.     fcbWriteBit                    = 0,                            /* Data can be written to this file */
  261.     fcbWriteMask                = 0x01,
  262.     fcbResourceBit                = 1,                            /* This file is a resource fork */
  263.     fcbResourceMask                = 0x02,
  264.     fcbWriteLockedBit            = 2,                            /* File has a locked byte range */
  265.     fcbWriteLockedMask            = 0x04,
  266.     fcbSharedWriteBit            = 4,                            /* File is open for shared write access */
  267.     fcbSharedWriteMask            = 0x10,
  268.     fcbFileLockedBit            = 5,                            /* File is locked (write-protected) */
  269.     fcbFileLockedMask            = 0x20,
  270.     fcbOwnClumpBit                = 6,                            /* File has clump size specified in FCB */
  271.     fcbOwnClumpMask                = 0x40,
  272.     fcbModifiedBit                = 7,                            /* File has changed since it was last flushed */
  273.     fcbModifiedMask                = 0x80
  274. };
  275.  
  276. /*
  277.  * ExtFileProc options
  278.  */
  279. enum {
  280.     extendFileAllBit            = 0,                            /* allocate all requested bytes or none */
  281.     extendFileAllMask            = 0x0001,
  282.     extendFileContigBit            = 1,                            /* force contiguous allocation */
  283.     extendFileContigMask        = 0x0002
  284. };
  285.  
  286. /*
  287.  *    HFS Component Interface constants
  288.  */
  289. /*
  290.  * compInterfMask bits specific to HFS component
  291.  */
  292. enum {
  293.     hfsCIDoesHFSBit                = 23,                            /* set if file system supports HFS calls */
  294.     hfsCIDoesHFSMask            = 0x00800000,
  295.     hfsCIDoesAppleShareBit        = 22,                            /* set if AppleShare calls supported */
  296.     hfsCIDoesAppleShareMask        = 0x00400000,
  297.     hfsCIDoesDeskTopBit            = 21,                            /* set if Desktop Database calls supported */
  298.     hfsCIDoesDeskTopMask        = 0x00200000,
  299.     hfsCIDoesDynamicLoadBit        = 20,                            /* set if dynamically loading code resource */
  300.     hfsCIDoesDynamicLoadMask    = 0x00100000,                    /*        supported */
  301.     hfsCIResourceLoadedBit        = 19,                            /* set if code resource already loaded */
  302.     hfsCIResourceLoadedMask        = 0x00080000,
  303.     hfsCIHasHLL2PProcBit        = 18,                            /* set if FFS' log2PhyProc and Extendfile proc */
  304.     hfsCIHasHLL2PProcMask        = 0x00040000                    /* is written in a high level language. (i.e., uses Pascal calling convention) */
  305. };
  306.  
  307. /*
  308.  *    Disk Initialization Component Interface constants
  309.  */
  310. /*
  311.  * compInterfMask bits specific to Disk Initialization component
  312.  */
  313. enum {
  314.     diCIHasExtFormatParamsBit    = 18,                            /* set if file system needs extended format */
  315.     diCIHasExtFormatParamsMask    = 0x00040000,                    /*        parameters */
  316.     diCIHasMultiVolTypesBit        = 17,                            /* set if file system supports more than one */
  317.     diCIHasMultiVolTypesMask    = 0x00020000,                    /*        volume type */
  318.     diCIDoesSparingBit            = 16,                            /* set if file system supports disk sparing */
  319.     diCIDoesSparingMask            = 0x00010000,
  320.     diCILiveBit                    = 0,                            /* set if file system is candidate for current */
  321.     diCILiveMask                = 0x00000001                    /*        formatting operation (set by PACK2) */
  322. };
  323.  
  324. /*
  325.  * Disk Initialization Component Function selectors
  326.  */
  327. enum {
  328.     diCILoad                    = 1,                            /* Make initialization code memory resident */
  329.     diCIUnload                    = 2,                            /* Make initialization code purgeable */
  330.     diCIEvaluateSizeChoices        = 3,                            /* Evaluate size choices */
  331.     diCIExtendedZero            = 4,                            /* Write an empty volume directory */
  332.     diCIValidateVolName            = 5,                            /* Validate volume name */
  333.     diCIGetVolTypeInfo            = 6,                            /* get volume type info */
  334.     diCIGetFormatString            = 7,                            /* get dialog format string */
  335.     diCIGetExtFormatParams        = 8,                            /* get extended format parameters */
  336.     diCIGetDefectList            = 9                                /* return the defect list for the indicated disk - reserved for future use */
  337. };
  338.  
  339. /*
  340.  * Constants used in the DICIEvaluateSizeRec and FormatListRec
  341.  */
  342. enum {
  343.     diCIFmtListMax                = 8,                            /* maximum number of format list entries in DICIEvaluateSizeRec.numSizeEntries */
  344. /*    bits in FormatListRec.formatFlags: */
  345.     diCIFmtFlagsValidBit        = 7,                            /* set if sec, side, tracks valid */
  346.     diCIFmtFlagsValidMask        = 0x80,
  347.     diCIFmtFlagsCurrentBit        = 6,                            /* set if current disk has this fmt */
  348.     diCIFmtFlagsCurrentMask        = 0x40,
  349. /*    bits in FormatListRec.sizeListFlags: */
  350.     diCISizeListOKBit            = 15,                            /* set if this disk size usable */
  351.     diCISizeListOKMask            = 0x8000
  352. };
  353.  
  354. /*
  355.  * DICIGetFormatStringRec.stringKind format strings
  356.  */
  357. enum {
  358.     diCIAlternateFormatStr        = 1,                            /* get alternate format  string (Balloon Help) */
  359.     diCISizePresentationStr        = 2                                /* get size presentation string (for dialog) */
  360. };
  361.  
  362. /*
  363.  * Error codes returned by Disk Sparing
  364.  */
  365. enum {
  366.     diCIUserCancelErr            = 1,                            /* user cancelled the disk init */
  367.     diCICriticalSectorBadErr    = 20,                            /* critical sectors are bad (hopeless)    */
  368.     diCISparingFailedErr        = 21,                            /* disk cannot be spared */
  369.     diCITooManyBadSectorsErr    = 22,                            /* too many bad sectors */
  370.     diCIUnknownVolTypeErr        = 23,                            /* the volume type passed in diCIExtendedZero paramBlock is not supported */
  371.     diCIVolSizeMismatchErr        = 24,                            /* specified volume size doesn’t match with formatted disk size */
  372.     diCIUnknownDICallErr        = 25,                            /* bogus DI function call selector */
  373.     diCINoSparingErr            = 26,                            /* disk is bad but the target FS doesn't do disk sparing */
  374.     diCINoExtendInfoErr            = 27,                            /* missing file system specific extra parameter in diCIExtendedZero call */
  375.     diCINoMessageTextErr        = 28                            /* missing message text in DIReformat call */
  376. };
  377.  
  378. /*
  379.  *    File System Manager constants
  380.  */
  381. /*
  382.  * Miscellaneous constants used by FSM
  383.  */
  384. enum {
  385.     fsdVersion1                    = 1,                            /* current version of FSD record */
  386.     fsmIgnoreFSID                = 0xfffe,                        /* this FSID should be ignored by the driver */
  387.     fsmGenericFSID                = 0xffff                        /* unknown foreign file system ID */
  388. };
  389.  
  390. /*
  391.  * compInterfMask bits common to all FSM components
  392.  */
  393. enum {
  394.     fsmComponentEnableBit        = 31,                            /* set if FSM component interface is enabled */
  395.     fsmComponentEnableMask        = 0x80000000,
  396.     fsmComponentBusyBit            = 30,                            /* set if FSM component interface is busy */
  397.     fsmComponentBusyMask        = 0x40000000
  398. };
  399.  
  400. /*
  401.  * Selectors for GetFSInfo
  402.  */
  403. enum {
  404.     fsmGetFSInfoByIndex            = -1,                            /* get fs info by index */
  405.     fsmGetFSInfoByFSID            = 0,                            /* get fs info by FSID */
  406.     fsmGetFSInfoByRefNum        = 1                                /* get fs info by file/vol refnum */
  407. };
  408.  
  409. /*
  410.  * InformFSM messages
  411.  */
  412. enum {
  413.     fsmNopMessage                = 0,                            /* nop */
  414.     fsmDrvQElChangedMessage        = 1,                            /* DQE has changed */
  415.     fsmGetFSIconMessage            = 2                                /* Get FFS's disk icon */
  416. };
  417.  
  418. /*
  419.  * Messages passed to the fileSystemCommProc
  420.  */
  421. enum {
  422.     ffsNopMessage                = 0,                            /* nop, should always return noErr */
  423.     ffsGetIconMessage            = 1,                            /* return disk icon and mask */
  424.     ffsIDDiskMessage            = 2,                            /* identify the about-to-be-mounted volume */
  425.     ffsLoadMessage                = 3,                            /* load in the FFS */
  426.     ffsUnloadMessage            = 4,                            /* unload the FFS */
  427.     ffsIDVolMountMessage        = 5,                            /* identify a VolMountInfo record */
  428.     ffsInformMessage            = 6,                            /* FFS defined message */
  429.     ffsGetIconInfoMessage        = 7
  430. };
  431.  
  432. /*
  433.  * Error codes from FSM functions
  434.  */
  435. enum {
  436.     fsmFFSNotFoundErr            = -431,                            /* Foreign File system does not exist - new Pack2 could return this error too */
  437.     fsmBusyFFSErr                = -432,                            /* File system is busy, cannot be removed */
  438.     fsmBadFFSNameErr            = -433,                            /* Name length not 1 <= length <= 31 */
  439.     fsmBadFSDLenErr                = -434,                            /* FSD size incompatible with current FSM vers */
  440.     fsmDuplicateFSIDErr            = -435,                            /* FSID already exists on InstallFS */
  441.     fsmBadFSDVersionErr            = -436,                            /* FSM version incompatible with FSD */
  442.     fsmNoAlternateStackErr        = -437,                            /* no alternate stack for HFS CI */
  443.     fsmUnknownFSMMessageErr        = -438                            /* unknown message passed to FSM */
  444. };
  445.  
  446. /*
  447.  *    HFS Utility routine records
  448.  */
  449. /*
  450.  * record used by UTGetPathComponentName
  451.  */
  452. struct ParsePathRec {
  453.     StringPtr                        namePtr;                    /* pathname to parse */
  454.     short                            startOffset;                /* where to start parsing */
  455.     short                            componentLength;            /* the length of the pathname component parsed */
  456.     SignedByte                        moreName;                    /* non-zero if there are more components after this one */
  457.     SignedByte                        foundDelimiter;                /* non-zero if parsing stopped because a colon (:) delimiter was found */
  458. };
  459. typedef struct ParsePathRec ParsePathRec;
  460.  
  461. typedef ParsePathRec *ParsePathRecPtr;
  462.  
  463. struct WDCBRec {
  464.     VCBPtr                            wdVCBPtr;                    /* Pointer to VCB of this working directory */
  465.     long                            wdDirID;                    /* Directory ID number of this working directory */
  466.     long                            wdCatHint;                    /* Hint for finding this working directory */
  467.     long                            wdProcID;                    /* Process that created this working directory */
  468. };
  469. typedef struct WDCBRec WDCBRec;
  470.  
  471. typedef WDCBRec *WDCBRecPtr;
  472.  
  473. struct FCBRec {
  474.     unsigned long                    fcbFlNm;                    /* FCB file number. Non-zero marks FCB used */
  475.     SignedByte                        fcbFlags;                    /* FCB flags */
  476.     SignedByte                        fcbTypByt;                    /* File type byte */
  477.     unsigned short                    fcbSBlk;                    /* File start block (in alloc size blks) */
  478.     unsigned long                    fcbEOF;                        /* Logical length or EOF in bytes */
  479.     unsigned long                    fcbPLen;                    /* Physical file length in bytes */
  480.     unsigned long                    fcbCrPs;                    /* Current position within file */
  481.     VCBPtr                            fcbVPtr;                    /* Pointer to the corresponding VCB */
  482.     Ptr                                fcbBfAdr;                    /* File's buffer address */
  483.     unsigned short                    fcbFlPos;                    /* Directory block this file is in */
  484. /* FCB Extensions for HFS */
  485.     unsigned long                    fcbClmpSize;                /* Number of bytes per clump */
  486.     Ptr                                fcbBTCBPtr;                    /* Pointer to B*-Tree control block for file */
  487.     unsigned long                    fcbExtRec[3];                /* First 3 file extents */
  488.     OSType                            fcbFType;                    /* File's 4 Finder Type bytes */
  489.     unsigned long                    fcbCatPos;                    /* Catalog hint for use on Close */
  490.     unsigned long                    fcbDirID;                    /* Parent Directory ID */
  491.     Str31                            fcbCName;                    /* CName of open file */
  492. };
  493. typedef struct FCBRec FCBRec;
  494.  
  495. typedef FCBRec *FCBRecPtr;
  496.  
  497. /*
  498.  *    HFS Component Interface records
  499.  */
  500. typedef pascal OSErr (*Lg2PhysProcPtr)(void *fsdGlobalPtr, VCBPtr volCtrlBlockPtr, FCBRecPtr fileCtrlBlockPtr, short fileRefNum, unsigned long filePosition, unsigned long reqCount, unsigned long *volOffset, unsigned long *contiguousBytes);
  501.  
  502. #if GENERATINGCFM
  503. typedef UniversalProcPtr Lg2PhysUPP;
  504. #else
  505. typedef Lg2PhysProcPtr Lg2PhysUPP;
  506. #endif
  507.  
  508. enum {
  509.     uppLg2PhysProcInfo = kPascalStackBased
  510.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  511.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void*)))
  512.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(VCBPtr)))
  513.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(FCBRecPtr)))
  514.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short)))
  515.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(unsigned long)))
  516.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(unsigned long)))
  517.          | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(unsigned long*)))
  518.          | STACK_ROUTINE_PARAMETER(8, SIZE_CODE(sizeof(unsigned long*)))
  519. };
  520.  
  521. #if GENERATINGCFM
  522. #define NewLg2PhysProc(userRoutine)        \
  523.         (Lg2PhysUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppLg2PhysProcInfo, GetCurrentArchitecture())
  524. #else
  525. #define NewLg2PhysProc(userRoutine)        \
  526.         ((Lg2PhysUPP) (userRoutine))
  527. #endif
  528.  
  529. #if GENERATINGCFM
  530. #define CallLg2PhysProc(userRoutine, fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes)        \
  531.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppLg2PhysProcInfo, (fsdGlobalPtr), (volCtrlBlockPtr), (fileCtrlBlockPtr), (fileRefNum), (filePosition), (reqCount), (volOffset), (contiguousBytes))
  532. #else
  533. #define CallLg2PhysProc(userRoutine, fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes)        \
  534.         (*(userRoutine))((fsdGlobalPtr), (volCtrlBlockPtr), (fileCtrlBlockPtr), (fileRefNum), (filePosition), (reqCount), (volOffset), (contiguousBytes))
  535. #endif
  536.  
  537. typedef pascal OSErr (*HFSCIProcPtr)(VCBPtr theVCB, short selectCode, void *paramBlock, void *fsdGlobalPtr, short fsid);
  538.  
  539. #if GENERATINGCFM
  540. typedef UniversalProcPtr HFSCIUPP;
  541. #else
  542. typedef HFSCIProcPtr HFSCIUPP;
  543. #endif
  544.  
  545. enum {
  546.     uppHFSCIProcInfo = kPascalStackBased
  547.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  548.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(VCBPtr)))
  549.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  550.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void*)))
  551.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*)))
  552.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(short)))
  553. };
  554.  
  555. #if GENERATINGCFM
  556. #define NewHFSCIProc(userRoutine)        \
  557.         (HFSCIUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppHFSCIProcInfo, GetCurrentArchitecture())
  558. #else
  559. #define NewHFSCIProc(userRoutine)        \
  560.         ((HFSCIUPP) (userRoutine))
  561. #endif
  562.  
  563. #if GENERATINGCFM
  564. #define CallHFSCIProc(userRoutine, theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid)        \
  565.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppHFSCIProcInfo, (theVCB), (selectCode), (paramBlock), (fsdGlobalPtr), (fsid))
  566. #else
  567. #define CallHFSCIProc(userRoutine, theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid)        \
  568.         (*(userRoutine))((theVCB), (selectCode), (paramBlock), (fsdGlobalPtr), (fsid))
  569. #endif
  570.  
  571. struct HFSCIRec {
  572.     long                            compInterfMask;                /* component flags */
  573.     HFSCIUPP                        compInterfProc;                /* pointer to file system call processing code */
  574.     Lg2PhysUPP                        log2PhyProc;                /* pointer to Lg2PhysProc() code */
  575.     Ptr                                stackTop;                    /* file system stack top */
  576.     long                            stackSize;                    /* file system stack size */
  577.     Ptr                                stackPtr;                    /* current file system stack pointer */
  578.     long                            reserved3;                    /* --reserved, must be zero-- */
  579.     long                            idSector;                    /* Sector you need to ID a local volume. For networked volumes, this must be -1 */
  580.     long                            reserved2;                    /* --reserved, must be zero-- */
  581.     long                            reserved1;                    /* --reserved, must be zero-- */
  582. };
  583. typedef struct HFSCIRec HFSCIRec;
  584.  
  585. typedef HFSCIRec *HFSCIRecPtr;
  586.  
  587. /*
  588.  *    Disk Initialization Component Interface records
  589.  */
  590. typedef pascal OSErr (*DICIProcPtr)(short whatFunction, void *paramBlock, void *fsdGlobalPtr);
  591.  
  592. #if GENERATINGCFM
  593. typedef UniversalProcPtr DICIUPP;
  594. #else
  595. typedef DICIProcPtr DICIUPP;
  596. #endif
  597.  
  598. enum {
  599.     uppDICIProcInfo = kPascalStackBased
  600.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  601.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  602.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void*)))
  603.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void*)))
  604. };
  605.  
  606. #if GENERATINGCFM
  607. #define NewDICIProc(userRoutine)        \
  608.         (DICIUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDICIProcInfo, GetCurrentArchitecture())
  609. #else
  610. #define NewDICIProc(userRoutine)        \
  611.         ((DICIUPP) (userRoutine))
  612. #endif
  613.  
  614. #if GENERATINGCFM
  615. #define CallDICIProc(userRoutine, whatFunction, paramBlock, fsdGlobalPtr)        \
  616.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDICIProcInfo, (whatFunction), (paramBlock), (fsdGlobalPtr))
  617. #else
  618. #define CallDICIProc(userRoutine, whatFunction, paramBlock, fsdGlobalPtr)        \
  619.         (*(userRoutine))((whatFunction), (paramBlock), (fsdGlobalPtr))
  620. #endif
  621.  
  622. struct DICIRec {
  623.     long                            compInterfMask;                /* component flags */
  624.     DICIUPP                            compInterfProc;                /* pointer to call processing code */
  625.     short                            maxVolNameLength;            /* maximum length of your volume name */
  626.     unsigned short                    blockSize;                    /* your file system's block size */
  627.     long                            reserved3;                    /* --reserved, must be zero-- */
  628.     long                            reserved2;                    /* --reserved, must be zero-- */
  629.     long                            reserved1;                    /* --reserved, must be zero-- */
  630. };
  631. typedef struct DICIRec DICIRec;
  632.  
  633. typedef DICIRec *DICIRecPtr;
  634.  
  635. /*
  636.  * FormatListRec as returned by the .Sony disk driver's
  637.  * Return Format List status call (csCode = 6).
  638.  * If the status call to get this list for a drive is not
  639.  * implemented by the driver, then a list with one entry
  640.  * is contructed from the drive queue element for the drive.
  641.  */
  642. struct FormatListRec {
  643.     unsigned long                    volSize;                    /* disk capacity in SECTORs */
  644.     SignedByte                        formatFlags;                /* flags */
  645.     SignedByte                        sectorsPerTrack;            /* sectors per track side */
  646.     unsigned short                    tracks;                        /* number of tracks */
  647. };
  648. typedef struct FormatListRec FormatListRec;
  649.  
  650. typedef FormatListRec *FormatListRecPtr;
  651.  
  652. /*
  653.  * SizeListRec built from FormatListRecs as described above.
  654.  */
  655. struct SizeListRec {
  656.     short                            sizeListFlags;                /* flags as set by external file system */
  657.     FormatListRec                    sizeEntry;                    /* disk driver format list record */
  658. };
  659. typedef struct SizeListRec SizeListRec;
  660.  
  661. typedef SizeListRec *SizeListRecPtr;
  662.  
  663. /*
  664.  * paramBlock for the diCIEvaluateSize call
  665.  */
  666. struct DICIEvaluateSizeRec {
  667.     short                            defaultSizeIndex;            /* default size for this FS */
  668.     short                            numSizeEntries;                /* number of size entries */
  669.     short                            driveNumber;                /* drive number */
  670.     SizeListRecPtr                    sizeListPtr;                /* ptr to size entry table */
  671.     unsigned short                    sectorSize;                    /* bytes per sector */
  672. };
  673. typedef struct DICIEvaluateSizeRec DICIEvaluateSizeRec;
  674.  
  675. typedef DICIEvaluateSizeRec *DICIEvaluateSizeRecPtr;
  676.  
  677. /*
  678.  * paramBlock for the diCIExtendedZero call
  679.  */
  680. struct DICIExtendedZeroRec {
  681.     short                            driveNumber;                /* drive number */
  682.     StringPtr                        volNamePtr;                    /* ptr to volume name string */
  683.     short                            fsid;                        /* file system ID */
  684.     short                            volTypeSelector;            /* volume type selector, if supports more than 1 type */
  685.     unsigned short                    numDefectBlocks;            /* number of bad logical blocks */
  686.     unsigned short                    defectListSize;                /* size of the defect list buffer in bytes */
  687.     Ptr                                defectListPtr;                /* pointer to defect list buffer */
  688.     unsigned long                    volSize;                    /* size of volume in SECTORs */
  689.     unsigned short                    sectorSize;                    /* bytes per sector */
  690.     Ptr                                extendedInfoPtr;            /* ptr to extended info */
  691. };
  692. typedef struct DICIExtendedZeroRec DICIExtendedZeroRec;
  693.  
  694. typedef DICIExtendedZeroRec *DICIExtendedZeroRecPtr;
  695.  
  696. /*
  697.  * paramBlock for the diCIValidateVolName call
  698.  */
  699. struct DICIValidateVolNameRec {
  700.     char                            theChar;                    /* the character to validate */
  701.     Boolean                            hasMessageBuffer;            /* false if no message */
  702.     short                            charOffset;                    /* position of the current character (first char = 1) */
  703.     StringPtr                        messageBufferPtr;            /* pointer to message buffer or nil */
  704.     short                            charByteType;                /* theChar's byte type (smSingleByte, smFirstByte, or smLastByte) */
  705. };
  706. typedef struct DICIValidateVolNameRec DICIValidateVolNameRec;
  707.  
  708. typedef DICIValidateVolNameRec *DICIValidateVolNameRecPtr;
  709.  
  710. /*
  711.  * paramBlock for the diCIGetVolTypeInfo call
  712.  */
  713. struct DICIGetVolTypeInfoRec {
  714.     unsigned long                    volSize;                    /* size of volume in SECTORs */
  715.     unsigned short                    sectorSize;                    /* bytes per sector */
  716.     short                            numVolTypes;                /* number of volume types supported */
  717.     Str32                            volTypesBuffer[4];            /* 4 string buffers */
  718. };
  719. typedef struct DICIGetVolTypeInfoRec DICIGetVolTypeInfoRec;
  720.  
  721. typedef DICIGetVolTypeInfoRec *DICIGetVolTypeInfoRecPtr;
  722.  
  723. /*
  724.  * paramBlock for the diCIGetFormatString call
  725.  */
  726. struct DICIGetFormatStringRec {
  727.     unsigned long                    volSize;                    /* volume size in SECTORs */
  728.     unsigned short                    sectorSize;                    /* sector size */
  729.     short                            volTypeSelector;            /* volume type selector */
  730.     short                            stringKind;                    /* sub-function = type of string */
  731.     Str255                            stringBuffer;                /* string buffer */
  732. };
  733. typedef struct DICIGetFormatStringRec DICIGetFormatStringRec;
  734.  
  735. typedef DICIGetFormatStringRec *DICIGetFormatStringRecPtr;
  736.  
  737. /*
  738.  * paramBlock for the diCIGetExtendedFormatParams call
  739.  */
  740. struct DICIGetExtendedFormatRec {
  741.     short                            driveNumber;                /* drive number */
  742.     short                            volTypeSelector;            /* volume type selector or 0 */
  743.     unsigned long                    volSize;                    /* size of volume in SECTORs */
  744.     unsigned short                    sectorSize;                    /* bytes per sector */
  745.     FSSpecPtr                        fileSystemSpecPtr;            /* pointer to the foreign file system's FSSpec */
  746.     Ptr                                extendedInfoPtr;            /* pointer to extended parameter structure */
  747. };
  748. typedef struct DICIGetExtendedFormatRec DICIGetExtendedFormatRec;
  749.  
  750. typedef DICIGetExtendedFormatRec *DICIGetExtendedFormatRecPtr;
  751.  
  752. /*
  753.  *    File System Manager records
  754.  */
  755. typedef pascal OSErr (*FSDCommProcPtr)(short message, void *paramBlock, void *globalsPtr);
  756.  
  757. #if GENERATINGCFM
  758. typedef UniversalProcPtr FSDCommUPP;
  759. #else
  760. typedef FSDCommProcPtr FSDCommUPP;
  761. #endif
  762.  
  763. enum {
  764.     uppFSDCommProcInfo = kPascalStackBased
  765.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  766.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  767.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void*)))
  768.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void*)))
  769. };
  770.  
  771. #if GENERATINGCFM
  772. #define NewFSDCommProc(userRoutine)        \
  773.         (FSDCommUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppFSDCommProcInfo, GetCurrentArchitecture())
  774. #else
  775. #define NewFSDCommProc(userRoutine)        \
  776.         ((FSDCommUPP) (userRoutine))
  777. #endif
  778.  
  779. #if GENERATINGCFM
  780. #define CallFSDCommProc(userRoutine, message, paramBlock, globalsPtr)        \
  781.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppFSDCommProcInfo, (message), (paramBlock), (globalsPtr))
  782. #else
  783. #define CallFSDCommProc(userRoutine, message, paramBlock, globalsPtr)        \
  784.         (*(userRoutine))((message), (paramBlock), (globalsPtr))
  785. #endif
  786.  
  787. struct FSDRec {
  788.     struct FSDRec                    *fsdLink;                    /* ptr to next */
  789.     short                            fsdLength;                    /* length of this FSD in BYTES */
  790.     short                            fsdVersion;                    /* version number */
  791.     short                            fileSystemFSID;                /* file system id */
  792.     Str31                            fileSystemName;                /* file system name */
  793.     FSSpec                            fileSystemSpec;                /* foreign file system's FSSpec */
  794.     Ptr                                fileSystemGlobalsPtr;        /* ptr to file system globals */
  795.     FSDCommUPP                        fileSystemCommProc;            /* communication proc with the FFS */
  796.     long                            reserved3;                    /* --reserved, must be zero-- */
  797.     long                            reserved2;                    /* --reserved, must be zero-- */
  798.     long                            reserved1;                    /* --reserved, must be zero-- */
  799.     HFSCIRec                        fsdHFSCI;                    /* HFS component interface    */
  800.     DICIRec                            fsdDICI;                    /* Disk Initialization component interface */
  801. };
  802. typedef struct FSDRec FSDRec;
  803.  
  804. typedef FSDRec *FSDRecPtr;
  805.  
  806. struct FSMGetIconInfoRec {
  807.     long                            theIcon[32];                /* The ICN# structure */
  808.     long                            theMask[32];                /* The mask for the icon above */
  809.     Str255                            whereStr;
  810. };
  811. typedef struct FSMGetIconInfoRec FSMGetIconInfoRec;
  812.  
  813. typedef FSMGetIconInfoRec *FSMGetIconInfoRecPtr;
  814.  
  815. /*
  816.  * paramBlock for ffsGetIconMessage and fsmGetFSIconMessage
  817.  */
  818. struct FSMGetIconRec {
  819.     short                            refNum;                        /* target drive num or volume refnum */
  820.     FSMGetIconInfoRecPtr            iconBufferPtr;                /* pointer to icon buffer */
  821.     long                            requestSize;                /* requested size of the icon buffer */
  822.     long                            actualSize;                    /* actual size of the icon data returned */
  823.     char                            iconType;                    /* kind of icon */
  824.     Boolean                            isEjectable;                /* true if the device is ejectable */
  825.     DrvQElPtr                        driveQElemPtr;                /* pointer to DQE */
  826.     FSSpecPtr                        fileSystemSpecPtr;            /* pointer to foreign file system's FSSpec */
  827.     long                            reserved1;                    /* --reserved, must be zero-- */
  828. };
  829. typedef struct FSMGetIconRec FSMGetIconRec;
  830.  
  831. typedef FSMGetIconRec *FSMGetIconRecPtr;
  832.  
  833. /*
  834.  *    HFS Utility routine prototypes
  835.  */
  836. extern pascal OSErr UTAllocateFCB(short *fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  837.  TWOWORDINLINE(0x7000, 0xA824);
  838. extern pascal OSErr UTReleaseFCB(short fileRefNum)
  839.  TWOWORDINLINE(0x7001, 0xA824);
  840. extern pascal OSErr UTLocateFCB(VCBPtr volCtrlBlockPtr, unsigned long fileNum, StringPtr namePtr, short *fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  841.  TWOWORDINLINE(0x7002, 0xA824);
  842. extern pascal OSErr UTLocateNextFCB(VCBPtr volCtrlBlockPtr, unsigned long fileNum, StringPtr namePtr, short *fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  843.  TWOWORDINLINE(0x7003, 0xA824);
  844. extern pascal OSErr UTIndexFCB(VCBPtr volCtrlBlockPtr, short *fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  845.  TWOWORDINLINE(0x7004, 0xA824);
  846. extern pascal OSErr UTResolveFCB(short fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  847.  TWOWORDINLINE(0x7005, 0xA824);
  848. extern pascal OSErr UTAllocateVCB(unsigned short *sysVCBLength, VCBPtr *volCtrlBlockPtr, unsigned short addSize)
  849.  TWOWORDINLINE(0x7006, 0xA824);
  850. extern pascal OSErr UTAddNewVCB(short driveNum, short *vRefNum, VCBPtr volCtrlBlockPtr)
  851.  TWOWORDINLINE(0x7007, 0xA824);
  852. extern pascal OSErr UTDisposeVCB(VCBPtr volCtrlBlockPtr)
  853.  TWOWORDINLINE(0x7008, 0xA824);
  854. extern pascal OSErr UTLocateVCBByRefNum(short refNum, short *vRefNum, VCBPtr *volCtrlBlockPtr)
  855.  TWOWORDINLINE(0x7009, 0xA824);
  856. extern pascal OSErr UTLocateVCBByName(StringPtr namePtr, short *moreMatches, short *vRefNum, VCBPtr *volCtrlBlockPtr)
  857.  TWOWORDINLINE(0x700A, 0xA824);
  858. extern pascal OSErr UTLocateNextVCB(StringPtr namePtr, short *moreMatches, short *vRefNum, VCBPtr *volCtrlBlockPtr)
  859.  TWOWORDINLINE(0x700B, 0xA824);
  860. extern pascal OSErr UTAllocateWDCB(WDPBPtr paramBlock)
  861.  TWOWORDINLINE(0x700C, 0xA824);
  862. extern pascal OSErr UTReleaseWDCB(short wdRefNum)
  863.  TWOWORDINLINE(0x700D, 0xA824);
  864. extern pascal OSErr UTResolveWDCB(long procID, short wdIndex, short wdRefNum, WDCBRecPtr *wdCtrlBlockPtr)
  865.  TWOWORDINLINE(0x700E, 0xA824);
  866. extern pascal OSErr UTFindDrive(short driveNum, DrvQElPtr *driveQElementPtr)
  867.  TWOWORDINLINE(0x700F, 0xA824);
  868. extern pascal OSErr UTAdjustEOF(short fileRefNum)
  869.  TWOWORDINLINE(0x7010, 0xA824);
  870. extern pascal OSErr UTSetDefaultVol(long nodeHint, unsigned long dirID, short refNum)
  871.  TWOWORDINLINE(0x7011, 0xA824);
  872. extern pascal OSErr UTGetDefaultVol(WDPBPtr paramBlock)
  873.  TWOWORDINLINE(0x7012, 0xA824);
  874. extern pascal OSErr UTEjectVol(VCBPtr volCtrlBlockPtr)
  875.  TWOWORDINLINE(0x702B, 0xA824);
  876. extern pascal OSErr UTCheckWDRefNum(short wdRefNum)
  877.  TWOWORDINLINE(0x7013, 0xA824);
  878. extern pascal OSErr UTCheckFileRefNum(short fileRefNum)
  879.  TWOWORDINLINE(0x7014, 0xA824);
  880. extern pascal OSErr UTCheckVolRefNum(short vRefNum)
  881.  TWOWORDINLINE(0x7015, 0xA824);
  882. extern pascal OSErr UTCheckPermission(VCBPtr volCtrlBlockPtr, short *modByte, unsigned long fileNum, ParmBlkPtr paramBlock)
  883.  TWOWORDINLINE(0x7016, 0xA824);
  884. extern pascal OSErr UTCheckVolOffline(short vRefNum)
  885.  TWOWORDINLINE(0x7017, 0xA824);
  886. extern pascal OSErr UTCheckVolModifiable(short vRefNum)
  887.  TWOWORDINLINE(0x7018, 0xA824);
  888. extern pascal OSErr UTCheckFileModifiable(short fileRefNum)
  889.  TWOWORDINLINE(0x7019, 0xA824);
  890. extern pascal OSErr UTCheckDirBusy(VCBPtr volCtrlBlockPtr, unsigned long dirID)
  891.  TWOWORDINLINE(0x701A, 0xA824);
  892. extern pascal OSErr UTParsePathname(short *volNamelength, StringPtr namePtr)
  893.  TWOWORDINLINE(0x701B, 0xA824);
  894. extern pascal OSErr UTGetPathComponentName(ParsePathRecPtr parseRec)
  895.  TWOWORDINLINE(0x701C, 0xA824);
  896. extern pascal OSErr UTDetermineVol(ParmBlkPtr paramBlock, short *status, short *moreMatches, short *vRefNum, VCBPtr *volCtrlBlockPtr)
  897.  TWOWORDINLINE(0x701D, 0xA824);
  898. extern pascal OSErr UTGetBlock(short refNum, void *log2PhyProc, unsigned long blockNum, short gbOption, Ptr *buffer)
  899.  TWOWORDINLINE(0x701F, 0xA824);
  900. extern pascal OSErr UTReleaseBlock(Ptr buffer, short rbOption)
  901.  TWOWORDINLINE(0x7020, 0xA824);
  902. extern pascal OSErr UTFlushCache(short refNum, short fcOption)
  903.  TWOWORDINLINE(0x7021, 0xA824);
  904. extern pascal OSErr UTMarkDirty(Ptr buffer)
  905.  TWOWORDINLINE(0x7023, 0xA824);
  906. extern pascal OSErr UTTrashVolBlocks(VCBPtr volCtrlBlockPtr)
  907.  TWOWORDINLINE(0x7024, 0xA824);
  908. extern pascal OSErr UTTrashFileBlocks(VCBPtr volCtrlBlockPtr, unsigned long fileNum)
  909.  TWOWORDINLINE(0x7025, 0xA824);
  910. extern pascal OSErr UTTrashBlocks(unsigned long beginPosition, unsigned long byteCount, VCBPtr volCtrlBlockPtr, short fileRefNum, short tbOption)
  911.  TWOWORDINLINE(0x7026, 0xA824);
  912. extern pascal OSErr UTCacheReadIP(void *log2PhyProc, unsigned long filePosition, Ptr ioBuffer, short fileRefNum, unsigned long reqCount, unsigned long *actCount, short cacheOption)
  913.  TWOWORDINLINE(0x7027, 0xA824);
  914. extern pascal OSErr UTCacheWriteIP(void *log2PhyProc, unsigned long filePosition, Ptr ioBuffer, short fileRefNum, unsigned long reqCount, unsigned long *actCount, short cacheOption)
  915.  TWOWORDINLINE(0x7028, 0xA824);
  916. extern pascal OSErr UTBlockInFQHashP(short vRefNum, unsigned long diskBlock)
  917.  TWOWORDINLINE(0x702C, 0xA824);
  918. /*
  919.  *    File System Manager call prototypes
  920.  */
  921. extern pascal OSErr InstallFS(FSDRecPtr fsdPtr);
  922. extern pascal OSErr RemoveFS(short fsid);
  923. extern pascal OSErr SetFSInfo(short fsid, short bufSize, FSDRecPtr fsdPtr);
  924. extern pascal OSErr GetFSInfo(short selector, short key, short *bufSize, FSDRecPtr fsdPtr);
  925. extern pascal OSErr InformFSM(short theMessage, void *paramBlock);
  926. extern pascal OSErr InformFFS(short fsid, void *paramBlock);
  927.  
  928. #ifdef __CFM68K__
  929. #pragma lib_export off
  930. #endif
  931.  
  932. #if GENERATINGPOWERPC
  933. #pragma options align=reset
  934. #endif
  935.  
  936. #ifdef __cplusplus
  937. }
  938. #endif
  939.  
  940. #endif /* __FSM__ */
  941.